package cn.com.cetccst.datacenter.policy.entity;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = PolicyEntity.TABLE_NAME)
//@TypeConverters(PolicyEntity.ComplianceConverter.class)
public class PolicyEntity {
    public static final String TABLE_NAME = "policy_entity";
    public static final String POLICY_PASSWORD = "commands.SetPasswordRestrictionsCmd";
    public static final String POLICY_COMPLIANCE = "commands.restriction.SetAndroidComplianceCmd";
    public static final String POLICY_RESTRICTION = "commands.restriction.SetAndroidRestrictionsCmd";
    public static final String POLICY_BLACK_WHITE_SETTING = "commands.app.SetBlacklistWhitelistSettingCmd";
    public static final String POLICY_VPN_PROFILE = "commands.vpn.AddVPNProfile2Cmd";
    public static final String POLICY_GENERAL_SETTING = "commands.SetGeneralSettingConfigCmd";
    public static final String POLICY_APP_MANAGEMENT = "commands.SetAppManagementConfigCmd";
    public static final String POLICY_WEBSITE_MANAGEMENT = "commands.app.SetWebsiteManagementCmd";
    public static final String POLICY_NETWORK_ACCESS_CONFIG = "commands.SetNetworkAccessConfigCmd";
    public static final String POLICY_APP_SECURITY_CONFIG = "commands.app.SetAppSecurityConfigCmd";
    public static final String POLICY_DEVICE_INFO = "commands.GetDeviceInfoCmd";

    //操作指令类型
    public static final String PARSER_OP_RESTART = "commands.RestartCmd";
    public static final String PARSER_OP_SHUTDOWN = "commands.ShutdownCmd";
    public static final String PARSER_OP_WIPE_SDCARD = "commands.SdresetCmd";
    public static final String PARSER_OP_WIPE_DEVICE = "commands.WipeCmd";
    public static final String PARSER_OP_UNENROLL = "commands.UnenrollCmd";
    public static final String PARSER_OP_LOCK_DEVICE = "commands.LockWithCodeCmd";
    public static final String PARSER_OP_UNLOCK_DEVICE = "commands.UnLockWithCodeCmd";

    @PrimaryKey
    @NonNull
    @ColumnInfo(name = "policy_name", defaultValue = "")
    private String policyName;

    @ColumnInfo(name = "policy_content")
    private String content;

    public PolicyEntity() {
        policyName = "";
    }

    public PolicyEntity(@NonNull String policyName, String policyContent) {
        this.policyName = policyName;
        this.content = policyContent;
    }

    @NonNull
    public String getPolicyName() {
        return policyName;
    }

    public void setPolicyName(@NonNull String policyName) {
        this.policyName = policyName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

}
